<!DOCTYPE html>
<html lang="en">
	<head>
		<include file="Index/head" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/jquerydate/css/jcDate.css" media="all" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/daterangepicker.css" />
		<script type="text/javascript" src="__PUBLIC__/date/js/laydate.js"></script>

		<style type="text/css">


		.box{width:970px; padding:10px 20px; background-color:#fff; margin:10px auto;}
		.box a{padding-right:20px;}

		.layinput{height: 22px;line-height: 22px;width: 150px;margin: 0;}
		.laydate-icon{ height: 31px; width: 200px;}
		</style>
	</head>
	<body>

		<include file="Index/header" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<include file="Index/menu" />
				
				<div class="main-content">
					<include file="Index/nav" />

					<div class="page-content">
						
							<!-- /**
							 * 右侧页面begin
							 */ -->
						<div class="row">
							<div class="col-xs-9">
								<!-- PAGE CONTENT BEGINS -->

								<form class="form-horizontal" role="form" action="{:U('Admin/Funding/modify')}" method="POST" enctype="multipart/form-data">
									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 项目名: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="项目名" class="col-xs-10 col-sm-8" name="pjname" value="{$list.pjname}">
										</div>
									</div>
									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 产品名: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="产品名" class="col-xs-10 col-sm-8" name="pdname" value="{$list.pdname}">
										</div>
									</div>
									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 品牌名: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="品牌名" class="col-xs-10 col-sm-8" name="brand" value="{$list.brand}">
										</div>
									</div>
									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 产品描述: </label>
										<div class="col-sm-4">
											<div class="widget-box">
												<div class="widget-header widget-header-small header-color-blue">  </div>
												<div class="widget-body">
													<div class="widget-main no-padding">
														<textarea class="span12 md-input" name="content" data-provide="markdown" rows="10" style="resize: none;">{$list.content}</textarea>
													</div>
													<div class="widget-toolbox padding-4 clearfix">
														<div class="btn-group pull-left">
														</div>
														<div class="btn-group pull-right">
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>

									<div class="space-4"></div>
									<input type="text" value="{$list.id}" name="id" hidden="hidden" />
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 选择所属分类: </label>

										<div class="col-sm-9">
											<!-- <input type="password" id="form-field-2" placeholder="再次输入密码" class="col-xs-10 col-sm-5" name="password2"> -->
											<label> 一级分类: </label>
											<select name="first_categoryid" id="classify">
											<option value="">一级分类</option>
											<volist name="classify" id="cvo">
											<option value="{$cvo.id}">{$cvo.name}</option>
											</volist>
											</select>
																					&nbsp;&nbsp;&nbsp;
											<label> 二级分类: </label>
											<select name="second_categoryid" id="classify_son">
											<option value="">二级分类</option>
											</select>

											<label style="color:red; margin-left:20px;"><b>原有分类:</b> {$list['first_categoryid']}-->{$list['second_categoryid']} </label>
										</div>
									</div>

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 选择套餐: </label>

										<div class="col-sm-9">
											<!-- <input type="password" id="form-field-2" placeholder="再次输入密码" class="col-xs-10 col-sm-5" name="password2"> -->
											<select name="packageid" id="classify">
											<option value="">选择套餐</option>
											<volist name="fundings_packageid" id="packageid">
											<option value="{$packageid.id}">{$packageid.name}</option>
											</volist>
											</select>
											<label style="color:red; margin-left:20px;"><b>原有套餐:</b> {$list.packageid}</label>
										</div>
									</div>

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 检测机构选择: </label>

										<div class="col-sm-9">
											<!-- <input type="password" id="form-field-2" placeholder="再次输入密码" class="col-xs-10 col-sm-5" name="password2"> -->
											<select name="institutionid" id="classify">
											<option value="">检测机构</option>
											<volist name="institutionid" id="inst">
											<option value="{$inst.id}">{$inst.name}</option>
											</volist>
											</select>
											<label style="color:red; margin-left:20px;"><b>原有机构:</b> {$list.institutionid}</label>

										</div>
									</div>
									

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 所需筹金(单位:分): </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="所需筹金" class="col-xs-10 col-sm-8" name="emoney" value="{$list.emoney}">
										</div>
									</div>


									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 项目状态: </label>
										<div class="radio" style="float:left; margin-right:10px; margin-top:-4px;">
											<label>
												<input name="state" type="radio" value="0" class="ace">
												<span class="lbl"> 审核中</span>
											</label>
										</div>

										<div class="state" style="float:left; margin-right:10px; margin-top:3px;">
											<label>
												<input name="state" type="radio" value="1" class="ace" >
												<span class="lbl"> 发起中</span>
											</label>
										</div>
										<div class="state" style="float:left; margin-right:10px; margin-top:3px;">
											<label>
												<input name="state" type="radio" value="2" class="ace" >
												<span class="lbl"> 抽样中</span>
											</label>
										</div>
										<div class="state" style="float:left; margin-right:10px; margin-top:3px;">
											<label>
												<input name="state" type="radio" value="3" class="ace" >
												<span class="lbl"> 已完成</span>
											</label>
										</div>
										<div class="state" style="float:left; margin-right:10px; margin-top:3px;">
											<label>
												<input name="state" type="radio" value="4" class="ace" >
												<span class="lbl"> 异常项目</span>
											</label>
										</div>
										<label style="color:red; margin-left:20px;"><b>原有状态:</b> {$list.state}</label>
									</div>
									

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 时间: </label>
										<div class="row">
											<div class="col-xs-8 col-sm-4">
											<input placeholder="选择开始时间" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="btime" value="{$list.btime|date="Y-m-d H:i:s",###}">
											<input placeholder="选择结束时间" class="laydate-icon" onClick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="etime" value="{$list.etime|date="Y-m-d H:i:s",###}">
											</div>
										</div>			
									</div>

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 发起人id: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="发起人id" class="col-xs-10 col-sm-8" name="mid" value="{$list.mid}">
										</div>
									</div>
									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 抽样数量: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="抽样数量" class="col-xs-10 col-sm-8" name="samnum" value="{$list.samnum}">
										</div>
									</div>
									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 抽样地址: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="抽样地址" class="col-xs-10 col-sm-8" name="location" value="{$list.location}">
										</div>
									</div>

									<!-- <div class="space-4"></div>
									<div class="form-group">

										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 产品图片: </label>
										<span class="label label-xlg label-primary arrowed arrowed-right" id="adds">添加</span>
										<div class="col-sm-8" id="photo" >
											<input type="file" id="form-field-2" class="col-xs-10 col-sm-10" name="photo[]">
										</div>
									</div>
									<div class="space-4"></div> -->
									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 排序: </label>
										<div class="col-sm-9">
											<input type="text" id="form-field-2" placeholder="抽样地址" class="col-xs-10 col-sm-8" name="rank" value="{$list.rank}">
										</div>
									</div>
									<hr />
									<div class="space-4"></div>
									<div class="form-group">

										<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 检测证书: </label>
										<!-- <span class="label label-xlg label-primary arrowed arrowed-right" id="addt">添加</span> -->
										<div class="col-sm-8" id="photot" >
											<input type="file" id="form-field-2" class="col-xs-10 col-sm-10" name="report">
										</div>
									</div>
						

									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 检测结果: </label>
										<div class="radio" style="float:left; margin-right:10px; margin-top:-4px;">
											<label>
												<input name="result" type="radio" value="1" class="ace" checked="checked">
												<span class="lbl"> 合格</span>
											</label>
										</div>

										<div class="state" style="float:left; margin-right:10px; margin-top:3px;">
											<label>
												<input name="result" type="radio" value="2" class="ace" >
												<span class="lbl"> 不合格</span>
											</label>
										</div>
									</div>
									<div class="space-4"></div>
									<div class="form-group">
									<div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="submit">
												<i class="icon-ok bigger-110"></i>
												保存
											</button>									
										&nbsp; &nbsp; &nbsp;
										<a href="{:U('Admin/Funding/all_lists')}">
											<button class="btn" type="button">
												<i class="icon-undo bigger-110"></i>
												返回
											</button>
										</a>
											
										</div>
									</div>

									<div class="hr hr-24"></div>

<!-- 									</div><! /row --> 

								</form>
							</div>
						</div>
							<!-- /**
							 * 右侧页面end
							 */ -->
					</div><!-- /.page-content -->
				</div>

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<include file="Index/footer" />
		<script type="text/javascript">
		$(document).ready(function(){
			$("#classify").change(function(){
				$("#classify_son").empty();
				var id=$("#classify").val();
				var url="{:U('Admin/Funding/ready_classify')}"
				$.ajax({
					type:'post',
					url:url,
					data:{id:id},
					dataType:'json',
					success: function(data){
						var str='';
						$.each(data,function(k,v){
							str+="<option value='"+v['id']+"'>";
							str+=v['name']+"</option>";

						});

						$("#classify_son").append(str);
					}
				});
			});

			$("#adds").click(function(){
				var str='<input type="file" id="form-field-2" class="col-xs-10 col-sm-3" name="photo[]">';
				$('#photo').append(str);
			});

			$("#addt").click(function(){
				var str='<input type="file" id="form-field-2" class="col-xs-10 col-sm-3" name="report[]">';
				$('#photot').append(str);
			});
		});



		</script>


	</body>
</html>
